//package com.woniuxy.microcurrentserver.util;
//
//import com.alibaba.fastjson.JSONObject;
//import com.woniuxy.bean.ResultBean;
//import com.woniuxy.microcurrentserver.entity.*;
//import com.woniuxy.microcurrentserver.service.CurrentFundAllService;
//import org.springframework.web.bind.annotation.*;
//import org.springframework.web.client.RestTemplate;
//
//import javax.annotation.Resource;
//import java.util.ArrayList;
//import java.util.List;
//
///**
// * @auther: Lenovo  <br/>
// * Date: 2021/4/7:15:13  <br/>
// * Description:信息获取工具控制类
// */
//@CrossOrigin
//@RestController
//@RequestMapping(value = {"/osa","/admin"},produces = "application/json;charset=utf-8")
//public class FundUtil {
//
//
//    @Resource
//    private RestTemplate restTemplate;
//    @Resource
//    private CurrentFundAllService currentFundAllService;
//
//    @GetMapping("/getAllFundCode")
//    public String get(){
//        String url = "https://api.doctorxiong.club/v1/fund/all";
//        FundAll res =  restTemplate.getForObject(url , FundAll.class);
//        System.out.println(res.getData().length);
//        System.out.println(res.getData()[0].length);
//        String[][] data = res.getData();
//
//        List<CurrentFundAll> list = new ArrayList<>();
//        for (String[] item:data) {
//            if(item[3].equals("货币型")){
//                CurrentFundAll currentFundAll = new CurrentFundAll();
//                currentFundAll.setCode(item[0]);
//                currentFundAll.setInitial(item[1]);
//                currentFundAll.setName(item[2]);
//                currentFundAll.setType(item[3]);
//                currentFundAll.setSpelling(item[4]);
//                list.add(currentFundAll);
//            }
//        }
//        currentFundAllService.insertAll(list);
//
//        return JSONObject.toJSONString(ResultBean.builder().msg("查询成功").code(200).build());
//    }
//
//
//
//    @GetMapping("/getFundInfo")
//    public String getFundInfo(String code){
//
//        String url = "https://api.doctorxiong.club/v1/fund/detail?code="+code;
//        CurrentFundMsgType res =  restTemplate.getForObject(url , CurrentFundMsgType.class);
//        CurrentFundInfo data = res.getData();
//
//
//        List<CurrentFundHistory> millionCopiesIncome = new ArrayList<>();
//        List<CurrentFundHistory> sevenDaysYearIncome = new ArrayList<>();
//
//
//        for (String[] item:
//             data.getMillionCopiesIncomeData()) {
//            CurrentFundHistory currentFundHistory = new CurrentFundHistory();
//            currentFundHistory.setCode(code);
//            currentFundHistory.setUpdate(item[0]);
//            currentFundHistory.setMillionCopiesIncome(item[1]);
//            millionCopiesIncome.add(currentFundHistory);
//        }
//
//        for (String[] item:
//                data.getSevenDaysYearIncomeData()) {
//            CurrentFundHistory currentFundHistory = new CurrentFundHistory();
//            currentFundHistory.setCode(code);
//            currentFundHistory.setUpdate(item[0]);
//            currentFundHistory.setSevenDaysYearIncome(item[1]);
//            sevenDaysYearIncome.add(currentFundHistory);
//        }
//
////        System.out.println(sevenDaysYearIncome.toString());
////        System.out.println(millionCopiesIncome.toString());
//        currentFundAllService.insertInfo(data,millionCopiesIncome,sevenDaysYearIncome);
//
//        return JSONObject.toJSONString(ResultBean.builder().msg("新增成功").code(200).build());
//    }
//
//
//    @PostMapping("/acl/login")
//    public String logn(){
//        return "{\"code\":200,\"msg\":\"成功\",\"object\":null,\"success\":true,\"data\":{\"token\":\"eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJSMrQwNDQ2MTQwMTdU0lFKrShQsjI0M7QwMDI1MDKqBQCDBp7RJgAAAA.MAwRZrnV6zR70_hLboBGlJDjBm-wSpdyBGTOBKOJvxIWNE4emr5E8MGHpbyeCaXlnu7gxhiJKPA-bqvJiiUJCw\"}}";
//    }
//
//
//    @PostMapping("/acl/index/info")
//    public String getInfo(){
//        return  "{\"code\":200,\"msg\":\"成功\",\"object\":null,\"success\":true,\"data\":{\"permissionValueList\":[\"user.list\",\"user.add\",\"user.update\",\"user.remove\",\"role.update\",\"role.list\",\"role.add\",\"role.remove\",\"permission.list\",\"permission.add\",\"permission.update\",\"permission.remove\",\"user.assgin\",\"role.acl\"],\"roles\":[\"产品运营\"],\"name\":\"18113410471\",\"avatar\":\"https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif\"}}";
//    }
//
//    @PostMapping("/acl/index/menu")
//    public String getMenu(){
//        return "\n" +
//                "{\"code\":200,\"msg\":\"成功\",\"object\":null,\"success\":true,\"data\":{\"permissionList\":[{\"redirect\":\"noredirect\",\"path\":\"/dashboard\",\"component\":\"Layout\",\"hidden\":false,\"children\":[],\"meta\":{\"icon\":null,\"title\":\"首页\"},\"name\":\"name_1195268474480156672\"},{\"redirect\":\"noredirect\",\"path\":\"/list\",\"component\":\"Layout\",\"hidden\":false,\"children\":[{\"path\":\"regular\",\"component\":\"/list/product/regular\",\"hidden\":false,\"meta\":{\"title\":\"定期管理\"},\"name\":\"name_1195268474480156674\"},{\"path\":\"saveRe\",\"component\":\"/list/product/saveRegular\",\"hidden\":true,\"meta\":{\"title\":\"新增定期产品\"},\"name\":\"name_1195268474480156675\"},{\"path\":\"edit/:id\",\"component\":\"/list/product/saveRegular\",\"hidden\":true,\"meta\":{\"title\":\"编辑定期产品\"},\"name\":\"name_1195268474480156676\"},{\"path\":\"recycleRegular\",\"component\":\"/list/product/regular\",\"hidden\":true,\"meta\":{\"title\":\"下架列表\"},\"name\":\"name_1195268474480156677\"},{\"path\":\"current\",\"component\":\"/list/product/current\",\"hidden\":false,\"meta\":{\"title\":\"活期管理\"},\"name\":\"name_1195268474480156678\"},{\"path\":\"/addcourse\",\"component\":\"/list/article/addCourseShow\",\"hidden\":true,\"meta\":{\"title\":\"新增课程\"},\"name\":\"name_1195268474480156679\"},{\"path\":\"/updatecourse/:id\",\"component\":\"/list/article/addCourseShow\",\"hidden\":true,\"meta\":{\"title\":\"编辑课程\"},\"name\":\"name_1195268474480156680\"},{\"path\":\"/deletecourse\",\"component\":\"/list/article/courseBin\",\"hidden\":true,\"meta\":{\"title\":\"课程回收站\"},\"name\":\"name_1195268474480156682\"},{\"path\":\"gold\",\"component\":\"/list/product/gold\",\"hidden\":false,\"meta\":{\"title\":\"黄金管理\"},\"name\":\"name_1195268474480156683\"},{\"path\":\"headLine/addHeadLine\",\"component\":\"/list/article/addHeadLineShow\",\"hidden\":true,\"meta\":{\"title\":\"新增文章\"},\"name\":\"name_1195268474480156684\"},{\"path\":\"headLine/addHeadLine/:id\",\"component\":\"/list/article/addHeadLineShow\",\"hidden\":true,\"meta\":{\"title\":\"编辑文章\"},\"name\":\"name_1195268474480156685\"},{\"path\":\"headLine/headLineBin\",\"component\":\"/list/article/headLineBin\",\"hidden\":true,\"meta\":{\"title\":\"文章回收站\"},\"name\":\"name_1195268474480156686\"},{\"path\":\"fund\",\"component\":\"/list/product/fund\",\"hidden\":false,\"meta\":{\"title\":\"基金管理\"},\"name\":\"name_1195268474480156687\"},{\"path\":\"activityAdd\",\"component\":\"/list/article/addActivityShow\",\"hidden\":true,\"meta\":{\"title\":\"新增活动\"},\"name\":\"name_1195268474480156688\"},{\"path\":\"activityupdate/:id\",\"component\":\"/list/article/addActivityShow\",\"hidden\":true,\"meta\":{\"title\":\"编辑活动\"},\"name\":\"name_1195268474480156689\"},{\"path\":\"activityRecycle\",\"component\":\"/list/article/activityRecycle\",\"hidden\":true,\"meta\":{\"title\":\"活动回收站\"},\"name\":\"name_1195268474480156690\"},{\"path\":\"payInfo\",\"component\":\"/list/article/activityRecycle\",\"hidden\":true,\"meta\":{\"title\":\"查看报名信息\"},\"name\":\"name_1195268474480156691\"},{\"path\":\"starTeacher\",\"component\":\"/list/article/starTeacher\",\"hidden\":false,\"meta\":{\"title\":\"明星教师\"},\"name\":\"name_1195268474480156692\"},{\"path\":\"addTeacher\",\"component\":\"/list/article/editAndAddTeacher\",\"hidden\":true,\"meta\":{\"title\":\"新增教师\"},\"name\":\"name_1195268474480156693\"},{\"path\":\"editTeacher/:id\",\"component\":\"/list/article/editAndAddTeacher\",\"hidden\":true,\"meta\":{\"title\":\"编辑教师\"},\"name\":\"name_1195268474480156694\"},{\"path\":\"recycle\",\"component\":\"/list/article/TeacherRecycle\",\"hidden\":true,\"meta\":{\"title\":\"教师回收站\"},\"name\":\"name_1195268474480156695\"}],\"meta\":{\"icon\":null,\"title\":\"产品管理\"},\"name\":\"name_1195268474480156673\"},{\"redirect\":\"noredirect\",\"path\":\"/listorder\",\"component\":\"Layout\",\"hidden\":false,\"children\":[{\"path\":\"/listorder\",\"component\":\"/list/order/CourseOrder\",\"hidden\":false,\"meta\":{\"title\":\"课程订单\"},\"name\":\"name_1195268474480156697\"},{\"path\":\"details/:id\",\"component\":\"/list/order/orderDetails\",\"hidden\":true,\"meta\":{\"title\":\"查看订单\"},\"name\":\"name_1195268474480156698\"},{\"path\":\"/activityOrder\",\"component\":\"/list/order/activity\",\"hidden\":true,\"meta\":{\"title\":\"活动订单\"},\"name\":\"name_1195268474480156727\"},{\"path\":\"/activityOrderDetails/:id\",\"component\":\"/list/order/activityOrderDetails\",\"hidden\":true,\"meta\":{\"title\":\"活动订单详情\"},\"name\":\"name_1195268474480156728\"}],\"meta\":{\"icon\":null,\"title\":\"订单管理\"},\"name\":\"name_1195268474480156696\"},{\"redirect\":\"noredirect\",\"path\":\"\",\"component\":\"Layout\",\"hidden\":false,\"children\":[{\"path\":\"customer\",\"component\":\"/list/article/CustomerDetail\",\"hidden\":false,\"meta\":{\"title\":\"用户管理\"},\"name\":\"name_1195268474480156700\"},{\"path\":\"editCustomer/:id\",\"component\":\"/list/article/editCustomerShow\",\"hidden\":true,\"meta\":{\"title\":\"编辑用户信息\"},\"name\":\"name_1195268474480156701\"}],\"meta\":{\"icon\":null,\"title\":\"用户管理\"},\"name\":\"name_1195268474480156699\"},{\"redirect\":\"noredirect\",\"path\":\"\",\"component\":\"Layout\",\"hidden\":false,\"children\":[{\"path\":\"customerService\",\"component\":\"/list/article/CostomerService\",\"hidden\":false,\"meta\":{\"title\":\"客服系统\"},\"name\":\"name_1195268474480156705\"}],\"meta\":{\"icon\":null,\"title\":\"客服系统\"},\"name\":\"name_1195268474480156704\"},{\"redirect\":\"noredirect\",\"path\":\"/mysetting\",\"component\":\"Layout\",\"hidden\":false,\"children\":[{\"path\":\"generalSetting\",\"component\":\"/list/setting/generalSetting\",\"hidden\":false,\"meta\":{\"title\":\"通用设置\"},\"name\":\"name_1195268474480156707\"},{\"path\":\"aboutUs\",\"component\":\"/list/setting/aboutUs\",\"hidden\":false,\"meta\":{\"title\":\"关于我们\"},\"name\":\"name_1195268474480156708\"},{\"path\":\"users\",\"component\":\"/acl/user/list\",\"hidden\":false,\"meta\":{\"title\":\"员工管理\"},\"name\":\"name_1195268474480156709\"},{\"path\":\"user/list\",\"component\":\"/acl/user/list\",\"hidden\":true,\"meta\":{\"title\":\"用户查看\"},\"name\":\"name_1195268474480156713\"},{\"path\":\"user/add\",\"component\":\"/acl/user/form\",\"hidden\":true,\"meta\":{\"title\":\"用户添加\"},\"name\":\"name_1195268474480156714\"},{\"path\":\"user/update/:id\",\"component\":\"/acl/user/form\",\"hidden\":true,\"meta\":{\"title\":\"用户修改\"},\"name\":\"name_1195268474480156715\"},{\"path\":\"user/role/:id\",\"component\":\"/acl/user/roleForm\",\"hidden\":true,\"meta\":{\"title\":\"用户角色分配\"},\"name\":\"name_1195268474480156725\"},{\"path\":\"roles\",\"component\":\"/acl/role/list\",\"hidden\":false,\"meta\":{\"title\":\"角色管理\"},\"name\":\"name_1195268474480156710\"},{\"path\":\"role/update/:id\",\"component\":\"/acl/role/form\",\"hidden\":true,\"meta\":{\"title\":\"角色修改\"},\"name\":\"name_1195268474480156717\"},{\"path\":\"role/list\",\"component\":\"/acl/role/list\",\"hidden\":true,\"meta\":{\"title\":\"角色查看\"},\"name\":\"name_1195268474480156718\"},{\"path\":\"role/add\",\"component\":\"/acl/role/form\",\"hidden\":true,\"meta\":{\"title\":\"角色添加\"},\"name\":\"name_1195268474480156719\"},{\"path\":\"role/distribution/:id\",\"component\":\"/acl/role/roleForm\",\"hidden\":true,\"meta\":{\"title\":\"角色权限分配\"},\"name\":\"name_1195268474480156726\"},{\"path\":\"operationLog\",\"component\":\"/list/setting/operationLog\",\"hidden\":false,\"meta\":{\"title\":\"操作日志\"},\"name\":\"name_1195268474480156711\"},{\"path\":\"menu\",\"component\":\"acl/menu/list\",\"hidden\":false,\"meta\":{\"title\":\"菜单管理\"},\"name\":\"name_1195268474480156729\"}],\"meta\":{\"icon\":null,\"title\":\"设置\"},\"name\":\"name_1195268474480156706\"}]}}";
//    }
//
//}
